package com.hmall.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hmall.order.pojo.Order;
import com.hmall.order.pojo.OrderDetail;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;


public interface OrderMapper extends BaseMapper<Order> {


    @Select("select * from tb_order where status = #{status}")
    List<Order> findOrderLists(Integer status);

    @Select("select * from tb_order where id = #{id}")
    Order getOrderDetil(Long id);

    @Update("update tb_order set status = #{status} where id = #{id}")
    void updateOrderStatus(@Param("status") Integer status, @Param("id") Long id);
}
